﻿using Microsoft.AspNetCore.Mvc;

namespace WMSProject.Controllers
{
    public class StockController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }

        // 入库管理页面：返回局部视图（无完整布局）
        public IActionResult StockIn()
        {
            // 模拟获取入库数据（替换为实际业务逻辑）
            var stockInModel = new
            {
                Title = "入库管理",
                Records = new List<object> {
                new { Id = 1, GoodsName = "笔记本电脑", Quantity = 10, Operator = "admin", Time = "2025-09-28" },
                new { Id = 2, GoodsName = "打印纸", Quantity = 100, Operator = "admin", Time = "2025-09-27" }
            }
            };

            return PartialView(stockInModel); // 关键：返回PartialView，而非View
        }
    }
}
